package com.design.pattern.singleton;

public class Singleton {
    private volatile static Singleton singleton;

    public Singleton() {
    }

    public static Singleton getInstance(){
        if (singleton == null){
            synchronized (Singleton.class){
                singleton = new Singleton();
            }
        }
        return singleton;
    }
}